package site.wlwsjsx.iot_backend.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 实验室详情DTO，供管理员查询使用，嵌套工位列表
 */
@Data
@Getter
@Setter
public class LabDetailDTO {
    // 实验室基础信息
    private Integer id;
    private String labName;
    private String labLocation;
    private Integer maxWorkstation;
    private Integer curStudentNum;

    // 实验室环境数据
    private Float temperature;
    private Float humidity;
    private Float smokeScope;

    // 嵌套的工位列表
    private List<WorkstationDetailDTO> workstations = null;
    // 时间信息
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime modifyTime;

    public LabDetailDTO() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLabName() {
        return labName;
    }

    public void setLabName(String labName) {
        this.labName = labName;
    }

    public String getLabLocation() {
        return labLocation;
    }

    public void setLabLocation(String labLocation) {
        this.labLocation = labLocation;
    }

    public Integer getMaxWorkstation() {
        return maxWorkstation;
    }

    public void setMaxWorkstation(Integer maxWorkstation) {
        this.maxWorkstation = maxWorkstation;
    }

    public Integer getCurStudentNum() {
        return curStudentNum;
    }

    public void setCurStudentNum(Integer curStudentNum) {
        this.curStudentNum = curStudentNum;
    }

    public Float getTemperature() {
        return temperature;
    }

    public void setTemperature(Float temperature) {
        this.temperature = temperature;
    }

    public Float getHumidity() {
        return humidity;
    }

    public void setHumidity(Float humidity) {
        this.humidity = humidity;
    }

    public Float getSmokeScope() {
        return smokeScope;
    }

    public void setSmokeScope(Float smokeScope) {
        this.smokeScope = smokeScope;
    }

    public LocalDateTime getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(LocalDateTime modifyTime) {
        this.modifyTime = modifyTime;
    }

    public List<WorkstationDetailDTO> getWorkstations() {
        return workstations;
    }

    public void setWorkstations(List<WorkstationDetailDTO> workstations) {
        this.workstations = workstations;
    }

    @Override
    public String toString() {
        return "LabDetailDTO{" +
                "id=" + id +
                ", labName='" + labName + '\'' +
                ", labLocation='" + labLocation + '\'' +
                ", maxWorkstation=" + maxWorkstation +
                ", curStudentNum=" + curStudentNum +
                ", temperature=" + temperature +
                ", humidity=" + humidity +
                ", smokeScope=" + smokeScope +
                ", workstations=" + workstations +
                ", modifyTime=" + modifyTime +
                '}';
    }
}